/*
 *  KeyMapper.h
 *  Dictionary
 *
 *  Created by Rune Laugesen on 21/09/10.
 *  Copyright 2010 Copenhagen University. All rights reserved.
 *
 */
#ifndef Dictionary_KeyMapper_h
#define Dictionary_KeyMapper_h

#include <string>
#include <vector>
#include <map>
#include "Instances.h"
#include "BKTree.h"

using namespace std;


/**
 * KeypadKeyMapper returns a list of best matches from whole word on keyed numerals
 * QwertKeyMapper returns a list of best matches from part of the word (auto completion)
 * Autocompletion can also be applied to KeypadKeyMapper
 */
class KeyMapper
{
protected:
    map<char, string> _alphabet;
    vector<string> _dictionary;
    int _distance;
    
public:
    virtual ~KeyMapper() {};
    virtual void MapDictionary() {};
    virtual vector<string> GetMappings(string word) {return vector<string>(); };
    void setDistance(int distance) {_distance = distance;};
    void BuildDictionary(Instances trainingdata);
    void BuildDictionary(map<string, vector<string> > trainingdata);
};

#endif